package com.wang.interview.designmode.builder;

/**
 * @author: wang
 * @date: 2021/7/31 20:11
 * @description:指挥者可以有多个，每一个通过建造者的建造方法指挥建造出不同的 House
 */
public class Director {
    private Builder builder;
    public Director(Builder builder){
        this.builder = builder;
    }

    public void setBuilder(Builder builder) {
        this.builder = builder;
    }

    public House direct(){
        builder.BuildBase();
        builder.BuildWall();
        builder.BuildRoof();
        return builder.buildHouse();
    }
}
